package de.wesemann.jdedun.entities.district.districts;

import java.util.List;

import de.wesemann.jdedun.entities.Paging;

public class DistrictDistrictsContainer {

    private List<DistrictDistrict> data;
    private Paging paging;

    /**
     * @return the data
     */
    public List<DistrictDistrict> getData() {
	return data;
    }

    /**
     * @param data
     *            the data to set
     */
    public void setData(List<DistrictDistrict> data) {
	this.data = data;
    }

    /**
     * @return the paging
     */
    public Paging getPaging() {
	return paging;
    }

    /**
     * @param paging
     *            the paging to set
     */
    public void setPaging(Paging paging) {
	this.paging = paging;
    }

    /*
     * (non-Javadoc)
     * 
     * @see java.lang.Object#hashCode()
     */
    @Override
    public int hashCode() {
	final int prime = 31;
	int result = 1;
	result = prime * result + ((data == null) ? 0 : data.hashCode());
	result = prime * result + ((paging == null) ? 0 : paging.hashCode());
	return result;
    }

    /*
     * (non-Javadoc)
     * 
     * @see java.lang.Object#equals(java.lang.Object)
     */
    @Override
    public boolean equals(Object obj) {
	if (this == obj) {
	    return true;
	}
	if (obj == null) {
	    return false;
	}
	if (getClass() != obj.getClass()) {
	    return false;
	}
	DistrictDistrictsContainer other = (DistrictDistrictsContainer) obj;
	if (data == null) {
	    if (other.data != null) {
		return false;
	    }
	} else if (!data.equals(other.data)) {
	    return false;
	}
	if (paging == null) {
	    if (other.paging != null) {
		return false;
	    }
	} else if (!paging.equals(other.paging)) {
	    return false;
	}
	return true;
    }

    /*
     * (non-Javadoc)
     * 
     * @see java.lang.Object#toString()
     */
    @Override
    public String toString() {
	StringBuilder builder = new StringBuilder();
	builder.append("DistrictDistrictsContainer [data=");
	builder.append(data);
	builder.append(", paging=");
	builder.append(paging);
	builder.append("]");
	return builder.toString();
    }
}
